package com.tang.model.composite.transparent;

/**
 * @Author tangyuan2meicloud.com
 * @DATE 2021/8/22 21:47
 * @Desc
 * @Remarks
 */
public class Course extends CourseCompnent {
    private String name;

    private double price;

    public Course(String name, double price) {
        this.name = name;
        this.price = price;
    }

    @Override
    public String getName() {
        return name;
    }

    @Override
    public Double getPrice() {
        return price;
    }

    @Override
    public void print() {
        System.out.println(name + " ￥ " + price + " 元");
    }
}
